package com.ruoyi.ring.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ring.mapper.RingSportDetailMapper;
import com.ruoyi.ring.domain.RingSportDetail;
import com.ruoyi.ring.service.IRingSportDetailService;

/**
 * 运动明细Service业务层处理
 * 
 * @author liuwp
 * @date 2025-08-07
 */
@Service
public class RingSportDetailServiceImpl implements IRingSportDetailService 
{
    @Autowired
    private RingSportDetailMapper ringSportDetailMapper;

    /**
     * 查询运动明细
     * 
     * @param id 运动明细主键
     * @return 运动明细
     */
    @Override
    public RingSportDetail selectRingSportDetailById(Long id)
    {
        return ringSportDetailMapper.selectRingSportDetailById(id);
    }

    /**
     * 查询运动明细列表
     * 
     * @param ringSportDetail 运动明细
     * @return 运动明细
     */
    @Override
    public List<RingSportDetail> selectRingSportDetailList(RingSportDetail ringSportDetail)
    {
        return ringSportDetailMapper.selectRingSportDetailList(ringSportDetail);
    }

    /**
     * 根据业务主键查询一条记录：运动明细
     *
     * @param ringSportDetail 运动明细
     * @return 运动明细
     */
    @Override
    public RingSportDetail selectOneRingSportDetail(RingSportDetail ringSportDetail)
    {
        return ringSportDetailMapper.selectOneRingSportDetail(ringSportDetail);
    }

    /**
     * 新增运动明细
     * 
     * @param ringSportDetail 运动明细
     * @return 结果
     */
    @Override
    public int insertRingSportDetail(RingSportDetail ringSportDetail)
    {
        ringSportDetail.setCreateTime(DateUtils.getNowDate());
        return ringSportDetailMapper.insertRingSportDetail(ringSportDetail);
    }

    /**
     * 修改运动明细
     * 
     * @param ringSportDetail 运动明细
     * @return 结果
     */
    @Override
    public int updateRingSportDetail(RingSportDetail ringSportDetail)
    {
        return ringSportDetailMapper.updateRingSportDetail(ringSportDetail);
    }

    @Override
    public int updateRingSportDetailCondition(RingSportDetail ringSportDetail, RingSportDetail ringSportDetailCondition)
    {
        return ringSportDetailMapper.updateRingSportDetailCondition(ringSportDetail, ringSportDetailCondition);
    }

    /**
     * 批量删除运动明细
     * 
     * @param ids 需要删除的运动明细主键
     * @return 结果
     */
    @Override
    public int deleteRingSportDetailByIds(Long[] ids)
    {
        return ringSportDetailMapper.deleteRingSportDetailByIds(ids);
    }

    /**
     * 删除运动明细信息
     * 
     * @param id 运动明细主键
     * @return 结果
     */
    @Override
    public int deleteRingSportDetailById(Long id)
    {
        return ringSportDetailMapper.deleteRingSportDetailById(id);
    }

    /**
     * 条件删除运动明细
     *
     * @param ringSportDetail 运动明细
     * @return 结果
     */
    @Override
    public int deleteRingSportDetailByCondition(RingSportDetail ringSportDetail)
    {
        return ringSportDetailMapper.deleteRingSportDetailByCondition(ringSportDetail);
    }

}
